package com.company.project.rest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.company.project.protocol.order.ConfirmOrderReq;
import com.company.project.protocol.order.ConfirmOrderRes;
import com.company.project.web.TradeOrderController;

@Api(value = "订单服务")
@Component
@RestController
@RequestMapping("/trade/order")
public class OrderApi extends TradeOrderController {

	/**
	 * 下单服务
	 * 
	 * @param confirmOrderReq
	 * @return
	 */
	@Override
	@ApiOperation(value = "下单服务")
	@PostMapping("/confirmOrder")
	public ConfirmOrderRes confirmOrder(ConfirmOrderReq confirmOrderReq) {
		return this.tradeOrderService.confirmOrder(confirmOrderReq);
	}
}
